<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <form id="my-form" class="am-form tpl-form-line-form" method="post">
                    <div class="widget-body">
                        <fieldset>
							<div class="widget-head am-cf">
                                <div class="widget-title am-fl">{$model['apply_mode']['text']}资料审查</div>
                            </div>
                            {if $model['apply_mode']['value'] != 40}
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">营业执照</label>
                                <div class="am-u-sm-9">
                                    <div class="apply-img">
                                        <a href="{$model['details']['license_copy']['url']}" target="_blank">
                                            <img src="{$model['details']['license_copy']['url']}" />
                                        </a>
                                    </div>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">类型</label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="data[details][subject_type]" value="SUBJECT_TYPE_INDIVIDUAL" data-am-ucheck 
                                        {$model['details']['subject_type']=='SUBJECT_TYPE_INDIVIDUAL' ? 'checked' : ''}> 个体
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="data[details][subject_type]" value="SUBJECT_TYPE_INSTITUTIONS" data-am-ucheck 
                                        {$model['details']['subject_type']=='SUBJECT_TYPE_INSTITUTIONS' ? 'checked' : ''}> 公司
                                    </label>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">公司名称</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="{$model['details']['merchant_name']}"
                                     name="data[details][merchant_name]" required>
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">统一社会信用代码</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="{$model['details']['license_number']}" 
                                     name="data[details][license_number]" required>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">身份证</label>
                                <div class="am-u-sm-9">
                                    <div class="apply-img">
                                        <a href="{$model['details']['id_card_copy']['url']}" target="_blank">
                                            <img src="{$model['details']['id_card_copy']['url']}" />
                                        </a>
                                    </div>
                                    <div class="apply-img">
                                        <a href="{$model['details']['id_card_national']['url']}" target="_blank">
                                            <img src="{$model['details']['id_card_national']['url']}" />
                                        </a>
                                    </div>
                                </div>
                            </div>
                            {/if}
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">姓名</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="{$model['details']['id_card_name']}" 
                                     name="data[details][id_card_name]" required>
                                </div>
                            </div>
                            {if $model['apply_mode']['value'] != 40}
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">身份证号</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="{$model['details']['id_card_number']}" 
                                     name="data[details][id_card_number]" required>
                                </div>
                            </div>
                            {/if}
                            {if $model['apply_mode']['value'] == 30}
                            {if !empty($model['details']['qualifications']['url'])}
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">特殊资质</label>
                                <div class="am-u-sm-9">
                                    <div class="apply-img">
                                        <a href="{$model['details']['qualifications']['url']}" target="_blank">
                                            <img src="{$model['details']['qualifications']['url']}" />
                                        </a>
                                    </div>
                                </div>
                            </div>
                            {/if}
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">开户银行</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="{$model['details']['bank_name']}" 
                                     name="data[details][bank_name]" required>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">银行账号</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="{$model['details']['account_number'] }" 
                                     name="data[details][account_number]" required>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">商户号</label>
                                <div class="am-u-sm-9">
                                    <input type="number" class="tpl-form-input" value="{$model['details']['mch_id']}" 
                                     name="data[details][mch_id]">
                                     <small>审核通过时此项必填</small>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">商户简称</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="{$model['merchant_shortname']}" 
                                     name="data[merchant_shortname]" required>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">小程序APP_ID</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" name="data[app_id]" value="{$model['app_id']}" required>
                                </div>
                            </div>
                            {/if}
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">联系电话</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $model['details']['mobile_phone'] ?>" 
                                     name="data[details][mobile_phone]" required>
                                </div>
                            </div>
                            {if $model['apply_mode']['value'] == 10 OR $model['apply_mode']['value'] == 20}
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">微信号</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="{$model['details']['legal_persona_wechat']}" 
                                     name="data[details][legal_persona_wechat]" required>
                                </div>
                            </div>
                            {/if}
                            {if $model['apply_mode']['value'] == 40}
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">级别</label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" data-am-ucheck {$model['agent_mode']['value'] == 10?'checked':''} disabled> 县区
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" data-am-ucheck {$model['agent_mode']['value'] == 20?'checked':''} disabled> 市级
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" data-am-ucheck {$model['agent_mode']['value'] == 30?'checked':''} disabled> 省级
                                    </label>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">区域</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="{$model['province']}{$model['city']}{$model['district']}" disabled>
                                </div>
                            </div>
                            {/if}
							<div class="widget-head am-cf">
                                <div class="widget-title am-fl">执行操作</div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">驳回原因</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" name="data[reject]" value="{$model['reject']}"
									{$model['apply_status']['value']!=10? 'disabled':''}>
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">操作类型类型</label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="data[apply_status]" value="10" 
                                        {$model['apply_status']['value']==10 ? 'checked':''} 
                                        {$model['apply_status']['value']==10 ? 'data-am-ucheck':'disabled'}> 
                                        保存
                                    </label>
                                    {if $model['apply_mode']['value'] == 10 OR $model['apply_mode']['value'] == 20}
                                    <label class="am-radio-inline">
                                        <input type="radio" name="data[apply_status]" value="20" 
                                        {$model['apply_status']['value']==20 ? 'checked':''} 
                                        {$model['apply_status']['value']==10 ? 'data-am-ucheck':'disabled'}> 
                                        提交审核
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" {$model['apply_status']['value']==30 ? 'checked':''} disabled> 审核成功
                                    </label>
                                    {else /}
                                    <label class="am-radio-inline">
                                        <input type="radio" name="data[apply_status]" value="30" 
                                        {$model['apply_status']['value']==30 ? 'checked':''} 
                                        {$model['apply_status']['value']==10 ? 'data-am-ucheck':'disabled'}> 
                                        审核成功
                                    </label>
                                    {/if}
									<label class="am-radio-inline">
                                        <input type="radio" name="data[apply_status]" value="40" 
                                        {$model['apply_status']['value']==40 ? 'checked':''} 
                                        {$model['apply_status']['value']==10 ? 'data-am-ucheck':'disabled'}> 
                                        资料驳回
                                    </label>
                                </div>
                            </div>
                            {if $model['apply_status']['value'] == 10}
                            <div class="am-form-group">
                                <div class="am-u-sm-9 am-u-sm-push-3 am-margin-top-lg">
                                    <button type="submit" class="j-submit am-btn am-btn-secondary">提交
                                    </button>
                                </div>
                            </div>
                            {/if}
                        </fieldset>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {

        $('#my-form').formPost();

    });
</script>
